<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.1/jquery.min.js"></script>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css" integrity="sha384-HSMxcRTRxnN+Bdg0JdbxYKrThecOKuH5zCYotlSAcp1+c8xmyTe9GYg1l9a69psu" crossorigin="anonymous"/>
    <script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
</head>
<body>
    <div id="app">
        email:<input type="text" v-model="email">
        subject:<input type="text" v-model="subject">
        text:<input type="text" v-model="text">
        <input type="button" value="发送" @click.prevent="sendEmail">
    </div>
</body>
<script>
    let app = new Vue({
        el:"#app",
        data:{
            email:"",
            subject:"",
            text:""
        },
        methods:{
            sendEmail(){
                let params = {
                    email:this.email,
                    subject: this.subject,
                    text: this.text
                }
                $.post("/mq/sendEmail",params,function (data) {
                    if (data == "ok"){
                        alert("发送成功")
                    }
                })
            }
        }
    })
</script>
</html>